package config

//"gopkg.in/yaml.v2"
//"io/ioutil"
//log "hms/util/logger"

type Config interface {

	// Init the config
	Init(opts ...Option) error
	// Options in the config
	Options() Options
	// Stop the config loader/watcher
	Close() error
	// Load config sources
	Load(opts ...Option) error
	// Force a source changeset sync
	Sync() error
	// Watch a value for changes
	//Watch(path ...string) (Watcher, error)

	Get(key string) (string, bool)              //获取参数， 后续可返回values
	Walk(f func(key string, value string) bool) //遍历参数,并执行操作处理函数
	//函数 返回true 表示 退出循环
}

// Watcher is the config watcher
// type Watcher interface {
// 	// Next() (reader.Value, error)
// 	// Stop() error
// }
